<template>
  <div>
    <div id="header_admin">
      <div class="left_cc">
        管理后台
        <div class="el-icon-finished icon_hh" @click="shousuoSide"></div>
      </div>
      <div class="right_cc">
        <el-button size="mini" class="btn" type="primary" plain @click="quit"
          >退出登录</el-button
        >
      </div>
    </div>
    <div id="add_app">
      <LeftSide :collapse="collapse"></LeftSide>
      <div id="rightContent">
        <router-view/>
      </div>
    </div>
  </div>
</template>

<script>
// @ is an alias to /src

import LeftSide from "@components/leftSide";
import Content1 from "@/views/Content1";

export default {
  name: "Home",
  data() {
    return {
      collapse: false
    };
  },
  components: {
    LeftSide,
    Content1,
  },
  methods: {
    shousuoSide() {
      console.log("cc", this.collapse);
      this.collapse = !this.collapse;
    },
    quit() {
      console.log(this.content);
      localStorage.clear("userInfoCS")
      window.close();
    }
  },
};
</script>
<style lang="stylus">
#header_admin {
  background-color: #2172ce;
  border-bottom: 1px solid #333;
  display: flex;

  .right_cc {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    padding-right: 30px;

    .btn {
      height: 32px;
    }
  }

  .left_cc {
    font-size: 18px;
    color: #fff;
    width: 240px;
    box-sizing: border-box;
    padding: 10px 0 10px 20px;
    border-right: 1px solid #999;
    position: relative;

    .icon_hh {
      position: absolute;
      top: 16px;
      right: 16px;
      font-size: 22px;
    }
  }
}

#add_app {
  display: flex;

  #leftSide {
    background-color: #2172ce;
  }

  #rightContent {
    flex: 1;
    // border-right 1px solid #f0f0f0;
    // border-bottom 1px solid #f0f0f0;
    min-height: calc(100vh - 50px);
    padding: 20px;
    box-sizing: border-box;
    background-color #f0f0f0
  }
}
</style>
